<?php

namespace App\Models\Cruise;

use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;
use App\Models\Traits\KfUid;
use App\Support\CustomForm\AttributeCruiseSupport;
use App\Support\CustomForm\AttributeSupport;
use Illuminate\Database\Eloquent\Relations\HasOne;

class CruiseTemplatePositionProjectMappingModel extends BaseModel
{
    use KfUid;

    protected $table = 'cruise_template_position_project_mappings';

    protected $fillable = [
        'templateId',
        'positionId',
        'projectId',
        'relationProjectId',
        'relationOptions',
    ];

    public function projectRel(): HasOne
    {
        return $this->hasOne(CruiseTaskProjectModel::class, 'id', 'projectId');
    }

    public function relationProjectRel(): HasOne
    {
        return $this->hasOne(CruiseTaskProjectModel::class, 'id', 'relationProjectId');
    }
}
